home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Book Chapters / 03 - Advanced Graphics / Example 7 / sprite.h < prev    next >
Text File  |  1995-02-27  |  777b  |  39 lines

  1. //
  2. //    File: sprite.h
  3. //
  4. //    This file is the header for sprite.c.
  5. //
  6. //    2/18/95 -- Created by Mick
  7. //
  8.  
  9. // shield
  10. #ifndef _sprite_h_
  11. #define _sprite_h_
  12.  
  13. // include files
  14.  
  15. #include <QDOffscreen.h>
  16.  
  17. // global defines
  18.  
  19. // global typedefs
  20.  
  21. typedef struct
  22. {
  23.     Rect fSpriteRect;                                // the rect that defines the bounds of the sprite
  24.     Handle fSpriteData;                            // the sprite data itself
  25. } tSpriteInfo;
  26.  
  27. // extern functions
  28.  
  29. extern tSpriteInfo *loadSprite( signed short inSpriteResID );
  30. extern void disposeSprite( tSpriteInfo *inSpriteInfo );
  31. extern void startSpriteDraw( Rect *inClipRect, PixMapHandle inDestPixMap );
  32. extern void endSpriteDraw( void );
  33. extern void drawSprite( tSpriteInfo *inSpriteInfo, Point inWhere );
  34.  
  35. // extern data
  36.  
  37. // end of shield
  38. #endif // #ifndef _sprite_h_
  39.